# Copyright 2019 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Tests for common transforms.

load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob")
load("//build_tools/bazel:iree_lit_test.bzl", "iree_lit_test_suite")

package(
    features = ["layering_check"],
    licenses = ["notice"],  # Apache 2.0
)

iree_lit_test_suite(
    name = "lit",
    srcs = enforce_glob(
        # keep sorted
        [
            "2d-scalable-to-1d-scalable.mlir",
            "aarch64_dotprod_vector_lowering.mlir",
            "aarch64_vector_lowering.mlir",
            "apply_scale_lowering.mlir",
            "assign_constant_ordinals.mlir",
            "assign_import_ordinals.mlir",
            "check_ir_before_llvm_conversion.mlir",
            "check_ir_before_llvm_conversion_not_fail_unbound.mlir",
            "convert_to_llvm.mlir",
            "emit_vectorization_remarks.mlir",
            "expand_f16_op_to_f32.mlir",
            "hal_executable_constants.mlir",
            "hal_interface_bindings.mlir",
            "hal_interface_constants.mlir",
            "hal_interface_workgroup_info.mlir",
            "illegal_configuration.mlir",
            "peel.mlir",
            "pipeline_arm_sme_streaming_mode_tests.mlir",
            "pipeline_pack_unpack_tests.mlir",
            "pipeline_pad_conv_tests.mlir",
            "pipeline_pad_tests.mlir",
            "pipeline_peel_and_vectorize_tests.mlir",
            "pipeline_riscv_aggressive_distribution_tests.mlir",
            "pipeline_split_reduction_tests.mlir",
            "pipeline_tests.mlir",
            "pipeline_transpose_avx2_tests.mlir",
            "pipeline_vector_masking_tests.mlir",
            "pipeline_vectorize_nd_extract_tests.mlir",
            "scalable_tile_and_vectorize_matmul.mlir",
            "select_aarch64_lowering_strategy.mlir",
            "select_aarch64_sme_lowering_strategy.mlir",
            "select_aarch64_sve_lowering_strategy.mlir",
            "select_aarch64_sve_lowering_strategy_peeling.mlir",
            "select_lowering_strategy_without_distribution.mlir",
            "select_riscv_lowering_strategy.mlir",
            "select_x86_64_lowering_strategy.mlir",
            "split_reduction.mlir",
            "synchronize_symbol_visibility.mlir",
            "tile.mlir",
            "tile-root-fuse-consumer-producer.mlir",
            "tile_and_fuse.mlir",
            "transform_dialect_bufferize.mlir",
            "unfused_fma.mlir",
            "vector_contract_to_arm_asm.mlir",
            "vector_contract_to_arm_intrinsics.mlir",
            "vector_lowering.mlir",
            "vector_transpose_lowering.mlir",
            "vectorize_with_masking_and_hoist.mlir",
            "verify_linalg_transform_legality.mlir",
            "verify_vector_size_legality.mlir",
        ],
        include = ["*.mlir"],
    ),
    cfg = "//compiler:lit.cfg.py",
    tools = [
        "//tools:iree-compile",
        "//tools:iree-opt",
        "@llvm-project//llvm:FileCheck",
    ],
)
